#include<stdio.h>
#include<conio.h>
long s[501][501];
long i,j,n,m,u,k,current=1000000l;
long row1=0,collum1=0,row2=1000,collum2=1000;
void input(){
    scanf("%ld%ld%ld",&m,&n,&k);
    for(i=1;i<=m;i++){
        for(j=1;j<=n;j++){
            scanf("%ld",&u);
            if(i==1)s[i][j]=s[i][j-1]+u;
            else if(j==1)s[i][j]=s[i-1][j]+u;
            else s[i][j]=u+s[i-1][j]+s[i][j-1]-s[i-1][j-1];
        }
    }
}
long getS(long row1,long collum1,long row2,long collum2){
    return s[row1-1][collum1-1]+s[row2][collum2]-s[row1-1][collum2]-s[row2][collum1-1];
}
void process(){
    long s,a,b,v;
    for(i=1;i<=m;i++)
        for(j=1;j<=n;j++)
            for(u=i;u<=m;u++){
                a=j;b=n;
                do{
                    v=(a+b)/2;
                    s=getS(i,j,u,v);
                    if(((v-j+1)*(u-i+1)>current) && s<k)break;
                    if(s>=k && ((v-j+1)*(u-i+1))<current){
                        current=((v-j+1)*(u-i+1));
                        row1=i;
                        collum1=j;
                        row2=u;
                        collum2=v;
                    }
                    if(s>k)b=v;else a=v;
                }while(b-a>1);
                
            }
        }
int main(){
    input();
    process();
    if(current==1000000l)printf("-1");
    else printf("%ld\n%ld %ld %ld %ld",current,row1,collum1,row2,collum2);
    getch();
    return 0;
}
